<template>
  <div>
    <el-dialog title="流转记录" v-model="open" width="80%">
      <el-table :data="flowList" border style="width: 100%">
        <el-table-column label="序号" align="center" width="80px">
          <template #default="scope">
            {{ scope.$index + 1 }}
          </template>
        </el-table-column>
        <el-table-column prop="nodeName" label="环节名称" align="center" />
        <el-table-column prop="nodeType" label="节点状态" align="center" />
        <el-table-column prop="receiveTime" label="接收时间" align="center" width="160px" />
        <el-table-column prop="operationTime" label="完成时间" align="center" width="160px" />
        <el-table-column prop="duration" label="任务历时" align="center" />
        <el-table-column prop="handlerName" label="审批人" align="center" />
        <el-table-column prop="action" label="审批结果" align="center">
          <template #default="scope">
            <el-tag v-if="scope.row.action == '1'" type="success">同意</el-tag>
            <el-tag v-else-if="scope.row.action == '2'" type="danger">退回</el-tag>
            <el-tag v-else-if="scope.row.action == '3'">不予立案</el-tag>
            <span v-else>--</span>
          </template>
        </el-table-column>
        <el-table-column prop="opinion" label="审批意见" align="center" width="200px" />
      </el-table>
    </el-dialog>
  </div>
</template>

<script setup lang="ts">
import { ref, computed, defineEmits } from 'vue'
const props = defineProps<{
  modelValue: boolean
  flowList: any[]
}>()
const emit = defineEmits(['update:modelValue'])
const open = computed({
  get() {
    return props.modelValue
  },
  set() {
    emit('update:modelValue', false)
  },
})
</script>

<style scoped></style>
